import static org.junit.Assert.*;
import junit.extensions.RepeatedTest;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.junit.Test;

/**
 * 
 */

/**
 * @author DAM_S
 *
 */
public class FacturaTest extends TestCase {

	Factura factura=new Factura();
	
	@Test
	public void testTotalFactura() {
		factura.meterProducto(new Producto("Pan",0.5f,5));
		factura.meterProducto(new Producto("Arroz",1.5f,2));
		
		assertEquals(factura.totalFactura(),5.5f,0.1);
	}
	
	@Test
	public void testAplicarIva(){
		factura.meterProducto(new Producto("Pan",0.5f,5));
		factura.meterProducto(new Producto("Arroz",1.5f,2));
		assertEquals(factura.aplicariva(0.2f),6.6f,0.1);
	}
	
	/*public static Test suite(){
		TestSuite suite=new TestSuite();
		suite.addTest(new RepeatedTest(new FacturaTest() , 50));
		return suite;
	}*/

}
